package chapter10;

import java.util.Arrays;
import java.util.TreeSet;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2019/2/19 14:28
 */
public class TreeSetTest {
    public static void main(String[] args) {
        TreeSet<String> words = new TreeSet<>();
        words.addAll(Arrays.asList(new String[]{"tree", "map", "hash", "map"}));

        words.forEach(System.out::println);

        System.out.println(words.last());
    }
}
